/*
 * @copyright fxsen <br/>
 * @date 2022/3/31 15:38 <br/>
 * @email <a href="mailto:fxsen@foxmail.com">
 * @author fxsen
 */
package com.fxsen.commons.sysmanager.core.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.fxsen.commons.core.base.common.service.impl.CommonServiceImpl;
import com.fxsen.commons.sysmanager.core.entity.Dictionary;
import com.fxsen.commons.sysmanager.core.mapper.DictionaryMapper;
import com.fxsen.commons.sysmanager.core.service.IDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 字典服务接口实现
 * @author fxsen
 * @date 2022/3/31 15:38
 * @email <a href="mailto:fxsen@foxmail.com">
 */
@Service
public class DictionaryServiceImpl extends CommonServiceImpl<DictionaryMapper,Dictionary> implements IDictionaryService {
    @Autowired
    private DictionaryMapper dictionaryMapper;

    @Override
    public List<Dictionary> getByCategoryId(String categoryId) {
        LambdaQueryWrapper<Dictionary> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Dictionary::getCategoryId,categoryId);
        return this.list(queryWrapper);
    }
}
